package com.imot.constant.code;


public enum ResponseCode implements IntCode {

    OK(ResponseCodeVal.OK, "成功"),
    SYSTEM_ERROR(ResponseCodeVal.SYSTEM_ERROR, "系统错误"),
    SYSTEM_BUSY(ResponseCodeVal.SYSTEM_BUSY, "系统繁忙"),
    CODE_BLANK(ResponseCodeVal.CODE_BLANK, "代码为空"),
    ARGUMENT_EXPIRED(ResponseCodeVal.ARGUMENT_EXPIRED, "参数过期"),
    ARGUMENT_INVALID(ResponseCodeVal.ARGUMENT_INVALID, "无效参数"),
    THE_OBJECT_NOT_FOUND(ResponseCodeVal.THE_OBJECT_NOT_FOUND, "对象未找到"),
    NO_AUTHENTICATION(ResponseCodeVal.NO_AUTHENTICATION, "无认证"),
    AUTHENTICATION_FAIL(ResponseCodeVal.AUTHENTICATION_FAIL, "认证失败"),
    AUTHENTICATION_EXPIRED(ResponseCodeVal.AUTHENTICATION_EXPIRED, "认证过期"),
    ACCOUNT_FREEZE(ResponseCodeVal.ACCOUNT_FREEZE, "账户冻结"),
    ACCOUNT_NO_PERMISSIONS_ACCESS(ResponseCodeVal.ACCOUNT_NO_PERMISSIONS_ACCESS, "账户无权限访问"),
    ALREADY_REGISTERED(ResponseCodeVal.ALREADY_REGISTERED, "已注册"),
    NO_REGISTRY(ResponseCodeVal.NO_REGISTRY, "未注册"),
    PASSWORD_ERROR(ResponseCodeVal.PASSWORD_ERROR, "密码错误"),
    PARAMETER_NOT_BLANK(ResponseCodeVal.PARAMETER_NOT_BLANK, "参数中的一些不能为空字段为空"),
    VERIFICATION_CODE_ERROR(ResponseCodeVal.VERIFICATION_CODE_ERROR, "验证码错误");


    private Integer val;
    private String msg;

    private ResponseCode(Integer val, String msg) {
        this.val = val;
        this.msg = msg;
    }

    @Override
    public Integer val() {
        return this.val;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}
